package com.motong.gongdan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author lsw
 * @time 2022/5/23 16:21
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "自定义表单")
@TableName(value = "form_table")
@Accessors(chain = true)
public class FormTable extends PublicPo{

    @ApiModelProperty(value = "编辑的时候传id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField(value = "code")
    private String code;
    @TableField(value = "create_time")
    private Date createTime;
    @TableField(value = "update_time")
    private Date updateTime;
    @TableField(value = "create_user")
    private Integer createUser;
    @TableField(value = "update_user")
    private Integer updateUser;


    @TableField(exist = false)
    @ApiModelProperty(value = "表单细节")
    private List<FormTableDetail> formTableDetails;

    @ApiModelProperty(value = "表单类型 0/1/2 销售订单/生产计划/装配工单")
    @TableField(value = "type")
    private Integer type;

    @TableField(exist = false)
    private String createName;
    @TableField(exist = false)
    private String updateName;
    @TableField(exist = false)
    @ApiModelProperty(value = "工单数量")
    private Integer workOrderNum = 0;
    @TableField(exist = false)
    @ApiModelProperty(value = "计划总量")
    private BigDecimal totalPlanNum = BigDecimal.ZERO;
    @TableField(exist = false)
    private Integer endWorkOrder;
    @TableField(exist = false)
    private BigDecimal rate;


    @TableField(value = "remote_sale_id")
    @ApiModelProperty(value = "远程销售订单id(erp)")
    private Long remoteSaleId;

}
